﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Presenters.Cistern.Modify
{
    public class PresenterModifySecondStep
    {
        ISecondStepForModifyCistern view;

        public PresenterModifySecondStep(ISecondStepForModifyCistern view)
        {
            this.view = view;
        }

        public void UpdateData()
        {
            view.Capacity = view.CisternToModify.Capacity.ToString();
            view.LicensePlate = view.CisternToModify.LicencePlate;
            //view.IsActive = view.CisternToModify.IsActive;
        }

        public void ChargeDataCistern()
        {
            view.CisternToModify.LicencePlate = view.LicensePlate;
            view.CisternToModify.Capacity = string.IsNullOrEmpty(view.Capacity)? 0 : Convert.ToInt32(view.Capacity);
        }
    }
}
